(bug 21222) Free <math> tag if not using it. Patch by Platonides.
authorChad Horohoe <demon@users.mediawiki.org>
Thu, 22 Oct 2009 11:40:38 +0000 (11:40 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Thu, 22 Oct 2009 11:40:38 +0000 (11:40 +0000)
RELEASE-NOTES
includes/parser/Parser.php

index 87f8e67..3fe43f9 100644 (file)
@@ -254,6 +254,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   reuploading.
 * Added $wgRateLimitsExcludedIPs, to allow specific IPs to be whitelisted from
   rate limits.
+* (bug 21222) When $wgUseTeX is not enabled, <math> is no longer registered with
+  the parser so extensions are free to implement their own <math> tag
 
 === Bug fixes in 1.16 ===
 
index c96ada4..f1d8fcd 100644 (file)
@@ -3282,8 +3282,11 @@ class Parser
                                        $output = Xml::escapeTagsOnly( $content );
                                        break;
                                case 'math':
-                                       $output = $wgContLang->armourMath(
-                                               MathRenderer::renderMath( $content, $attributes ) );
+                                       if ( $this->mOptions->getUseTeX() ) {
+                                               $output = $wgContLang->armourMath(
+                                                       MathRenderer::renderMath( $content, $attributes ) );
+                                       }
+                                       /* else let a tag hook handle it (bug 21222) */ 
                                        break;
                                case 'gallery':
                                        $output = $this->renderImageGallery( $content, $attributes );